<? 
	$title="Error";
	require("required/dbconnect.php");

	require("required/header.php");
	
	if(empty($_GET['error']))
	{
		$error=0;
	}
	else
	{
		$error=$_GET['error'];
	}
	
	if(empty($_GET['back']))
	{
		$back=2;
	}
	else
	{
		$back=$_GET['back'];
	}
	
	switch ($error) {
	case 0:
		$message = "Sorry, unknown error";
		break;
	case 1:
		$message = "Sorry, only members are allowed to this function. Kindly register as a member.";
		break;
	case 2:
		$message = "Invalid verification code";	
		break;
	case 3:
		$message = "Sorry, your cart is empty";		
		break;
	case 4:
		$errormsg=$_GET['errormsg'];
		$attempted=$_GET['attempt'];
		$message = "Sorry, email failed to sent, Please try again later<br><br>Failed reason : <b>".$errormsg."</b>.<br>tries attempted : $attempted";		
		
		break;
	case 5:
		$message = "Illegal operation!";		
		break;		
	} 


?>
	<table width="100%">
		<td valign="top" height="400"  >
			<div class="dw_failed"> <?= $message ?>	</div>
			<br><br><br><br>
			<input type="button" class="button" value="Back" onClick="history.go(-<?= $back ?>)">
		</td>
	</table>	
<? require("required/footer.php") ?>		